# include <stdio.h>
int is_runnian(int y)
{
	return ((0 == y % 4) && (0 != y % 100) || (0 == y % 400));
	
}
int main()
{
	int y = 0;
	int count = 0;
	for (y = 1000; y <= 2000; y++)
	{
		if (1 == is_runnian(y))
		{
			printf("%d ", y);
			count++;
		}
	}printf("\n%d ", count);
	return 0;
 }